<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<!--无数据提示 开始-->
<section th:if="${#lists.isEmpty(dataMap['list'])}" class="no-data__wrap">
    <span class="no-data-ico"></span>
    <p class="mt20"><span class="c-666">抱歉，还没有图书~~~</span></p>
</section>
<!--无数据提示 结束-->

<div class="book-list__wrap" th:if="!${#lists.isEmpty(dataMap['list'])}">
    <input  th:value="${dataMap['size']}" hidden id="book_count"/>
    <article th:each="book : ${dataMap['list']}" class="b-l-item" th:attrappend="data-book=${book['id']}">
        <div class="media">
            <div class="media-left" data-details>
                <a href="javascript:void(0)">
                    <img class="media-object lazy" th:attrappend="data-original=${book['imageMap']['pcUrlMap']['large']}" width="134" height="200"/>
                </a>
            </div>
            <div class="media-body">
                <dl class="clearfix">
                    <dt class="bb-name hLh30 txtOf ml5 pl10 mb5" data-details>
                        <a th:title="${book['bookName']}" class="c-333" href="javascript:void(0)" th:text="${book['bookName']}"></a>
                    </dt>
                    <dd class="bb-price pull-left col-sm-6">
                        <div class="dt pull-left c-999">售 　价：</div>
                        <div class="dd pull-left">
                            <strong class="c-primary" th:if="${book['realPrice']}<=0 ">免费</strong>
                            <strong class="c-danger" th:if="${book['realPrice']}>0" th:text="${book['realPrice']}"></strong>
                            <span class="c-999 ml5 fs12" th:if="${selaSwitch}==3">(会员价：<samp th:text="${book['memberPrice']}>0? '￥'+${book['memberPrice']}:'免费'"></samp>)</span>
                            <span class="c-999 ml5 fs12" th:if="${selaSwitch} !=3  and ${book['realPrice']}!=0 and ${book['realPrice']} != ${book['rawPrice']} and ${book['rawPrice']} != ${book['memberPrice']}">(<samp th:text="${#numbers.formatDecimal(book['realPrice']/book['rawPrice']*10,1,1,'POINT')}"></samp>折)</span>
                        </div>
                    </dd>
                    <dd class="bb-market  pull-left col-sm-6">
                        <div class="dt pull-left c-999">定　价：</div>
                        <div class="dd pull-left">
                            <del class="c-999" th:text="${book['rawPrice']}"></del>
                        </div>
                    </dd>
                </dl>
                <ul class="summary c-999 fs12 ml5 pl10">
                    <li><span class="dt">作　　者：</span> <span class="dd" th:text="${book['author']}"></span></li>
                    <li><span class="dt">出  版  社：</span> <span class="dd" th:text="${book['bookPress']}"> </span></li>
                    <li>
                        <span class="dt">出版时间：</span>
                        <span class="dd" th:text="${book['publishTime']!=null?#strings.substring(book['publishTime'],0,10):null}"></span>
                    </li>
                    <li>
                        <span class="dt">分　　类：</span>
                        <span class="dd">
                            <samp th:each="subject : ${book['subjectList']}" th:utext="${subject['subjectName']}+'&nbsp;'"></samp>
                        </span>
                    </li>
                    <li><span class="dt">库　　存：</span> <span class="dd" th:text="${book['stockNum']}"></span></li>
                </ul>
            </div>
            <div class="media-right">
                <section class="book-r-btn__wrap mt20 pt10 ml20">
                    <p>
                        <a href="javascript:void(0)">
                            <button type="button" class="btn btn-block btn-outline btn-info" data-details>查看详情</button>
                        </a>
                    </p>
                    <p>
                        <a href="javascript:void(0)">
                            <button type="button" th:value="${book['id']}"  th:attr="data-stockNum=${book['stockNum']},data-bookName=${book['bookName']}"   class="btn btn-block btn-outline btn-info book_buy">立即购买</button>
                        </a>
                    </p>
                </section>
            </div>
        </div>
        <hr>
    </article>
    <!-- 分页，开始 -->
    <div data-th-replace="layout/webPage"></div>
    <!-- 分页，结束 -->
</div>
<input type="hidden" id="book-total" th:value="${dataMap['total']}"/>
</html>
